Sets the value of the property with optional index values for index properties.
Syntax
'Declaration
Public Overloads Overrides Sub SetValue( _
ByVal As System.Object, _
ByVal As System.Object, _
ByVal () As System.Object _
)
public override void SetValue(
System.object ,
System.object ,
System.object[]
)
Parameters
- obj
- The object whose property value will be set.
- value
- The new value for this property.
- index
- Optional index values for indexed properties. This value should be null for non-indexed properties.
Exceptions
Exception | Description |
System.ArgumentException | The array does not contain the type of arguments needed.-or- The property's set accessor is not found. |
System.Reflection.TargetException | The object does not match the target type, or a property is an instance property but is null. |
System.Reflection.TargetParameterCountException | The number of parameters in does not match the number of parameters the indexed property takes. |
System.MethodAccessException | There was an illegal attempt to access a private or protected method inside a class. |
System.Reflection.TargetInvocationException | An error occurred while setting the property value. For example, an index value specified for an indexed property is out of range. The System.Exception.InnerException property indicates the reason for the error. |
See Also